<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Video extends Model
{
    use HasFactory;
    use SoftDeletes;
    public function middle(){
        return $this->belongsToMany(Expert::class,'middles','video_id','expert_id')
            ->withTimestamps();
    }
    protected $fillable = [

        'title',
        'video',
        'type',
        'expert',
        'start_at',
        'end_at',
        'image',
        'info',
    ];

}
